home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
graphic
/
tpega.zip
/
WORLD.P
< prev
Wrap
Text File
|
1986-02-01
|
1KB
|
55 lines
{ }
{ EGA Graphic Primitive for Turbo Pascal 3.01A, Version 10JAN86. }
{ (C) 1986 by Kent Cedola, 2015 Meadow Lake Ct., Norfolk, VA, 23518 }
{ }
{ Description: This an example of how graphic primitives can be put }
{ together to form 'HIGH LEVEL' graphic routines. }
{ }
procedure SetViewport(X1,Y1,X2,Y2: Integer);
begin
GPVIEWPORT(X1,Y1,X2,Y2);
end;
procedure SetWindow(X1,Y1,X2,Y2: Integer);
begin
GPWINDOW(X1,Y1,X2,Y2);
end;
procedure MovAbs(X,Y: Integer);
begin
GDCURX1 := X;
GDCURY1 := Y;
end;
procedure MovRel(X,Y: Integer);
begin
GDCURX1 := GDCURX1 + X;
GDCURY1 := GDCURY1 + Y;
end;
procedure LnAbs(X2,Y2: Integer);
var
X1,Y1: Integer;
I: Integer;
begin
X1 := GDCURX1;
Y1 := GDCURY1;
GDCURX1 := X2;
GDCURY1 := Y2;
if GPCLIP2(X1,Y1,X2,Y2) <> 2 then
begin
GPSCALE(X1,Y1);
GPMOVE(X1,Y1);
GPSCALE(X2,Y2);
GPLINE(X2,Y2);
end;
end;
procedure LnRel(X,Y: Integer);
begin
LnAbs(GDCURX1 + X, GDCURY1 + Y);
end;